<template>
    <el-card>
        <div class="form-filter">
            <el-button size="small" type="primary">添加数据库</el-button>
            <el-button size="small">root密码</el-button>
            <el-button size="small">phpMyAdmin</el-button>
        </div>
        <r-table :data="tableData" :columns="columns">
            <template slot="actions">
                <el-button type="text">管理</el-button>
                <el-divider direction="vertical"></el-divider>
                <el-button type="text">工具</el-button>
            </template>
        </r-table>
    </el-card>
</template>

<script>
    export default {
        name: 'database',
        data () {
            return {
                tableData: [
                    { database: 'admin1', username: 'admin', password: '******', backup: '', note: '这里是备注1'},
                    { database: 'admin2', username: 'admin', password: '******', backup: '', note: '这里是备注2'},
                    { database: 'admin3', username: 'admin', password: '******', backup: '', note: '这里是备注3'},
                ],
                columns: [
                    {
                        label: '数据库名',
                        value: 'database'
                    },
                    {
                        label: '用户名',
                        value: 'username'
                    },
                    {
                        label: '密码',
                        value: 'password'
                    },
                    {
                        label: '备份',
                        value: 'backup'
                    },
                    {
                        label: '备注',
                        value: 'note'
                    },
                    {
                        label: '操作',
                        scope: 'actions'
                    }
                ]
            }
        }
    }
</script>